From: Felix Fietkau Date: Tue, 26 Mar 2024 19:10:02 +0000 (+0100) Subject: add strdupa macro for compatibility X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=e209a4ced1d80e8a4ac4290a6ade9d339eab1705;p=project%2Fuclient.git add strdupa macro for compatibility Signed-off-by: Felix Fietkau --- diff --git a/uclient-fetch.c b/uclient-fetch.c index 282092e..1e51ff3 100644 --- a/uclient-fetch.c +++ b/uclient-fetch.c @@ -41,6 +41,10 @@ #define LIB_EXT "so" #endif +#ifndef strdupa +#define strdupa(x) strcpy(alloca(strlen(x)+1),x) +#endif + static const char *user_agent = "uclient-fetch"; static const char *post_data; static const char *post_file;